/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
function clientSystemCheck(contextpath,mode,clusterId,transTypeId,divId,infoDiv){
    $.ajax({
        url: contextpath+'/service/sgw_client_sys_check?clusterId='+clusterId+'&transTypeId='+transTypeId+'&mode='+mode,
        type: 'GET',
        beforeSend:function(){
            f$(infoDiv).innerHTML="checking....";
        },
        success: function(data){     
            if(data.info!=null){
                f$(infoDiv).innerHTML=data.info;
            }else{
                f$(infoDiv).innerHTML="";
            }
            if(data.suc=='1'){
                f$(divId).style.backgroundColor='green';
            }else{
                f$(divId).style.backgroundColor='gray';
            }
        }
    });
}
function serverSystemCheck(contextpath,mode,clusterId,transTypeId,divId,infoDiv){
    $.ajax({
        url: contextpath+'/service/sgw_server_sys_check?clusterId='+clusterId+'&transTypeId='+transTypeId+'&mode='+mode,
        type: 'GET',
        beforeSend:function(){
            f$(infoDiv).innerHTML="checking....";
        },
        success: function(data){
            if(data.info!=null){
                f$(infoDiv).innerHTML=data.info;
            }else{
                f$(infoDiv).innerHTML="";
            }
            if(data.suc=='1'){
                f$(divId).style.backgroundColor='green';
            }else{
                f$(divId).style.backgroundColor='gray';
            }
        }
    });
}

function sgwCommonCheck(contextpath,mode,clusterId,transTypeId,divId,infoDiv,checkType){
    $.ajax({
        url: contextpath+'/service/sgw_common_check?clusterId='+clusterId+'&transTypeId='+transTypeId+'&mode='+mode+'&checkType='+checkType,
        type: 'GET',
        beforeSend:function(){
            f$(infoDiv).innerHTML="checking....";
        },
        success: function(data){
            if(data.info!=null){
                f$(infoDiv).innerHTML=data.info;
            }else{
                f$(infoDiv).innerHTML="";
            }
            if(data.suc=='1'){
                f$(divId).style.backgroundColor='green';
            }else{
                f$(divId).style.backgroundColor='gray';
            }
        }
    });
}


